import Vue from 'vue'
import Router from 'vue-router'
import App from '../App'

import login from '../pages/login'

import addPlan from '../components/addPlan'

import pandect from '../pages/scheduleManage/pandect'
import scheduleTable from '../pages/scheduleManage/scheduleTable'
import detailsList from '../pages/scheduleManage/detailsList'
import echarts from '../pages/scheduleManage/echarts'

import userGroup from '../pages/user/userGroup'
import group from '../pages/user/group'

import site from '../pages/site/site'
import brand from '../pages/brand/brand'
import channel from '../pages/channel/channel'

Vue.use(Router)

export default new Router({
    // mode: 'hash',
    linkActiveClass: 'layui-this',
    hashbang: true,
    history: false,
    saveScrollPosition: true,
    suppressTransitionError: true,
    routes: [
        {
            path: '',
            title: '登录',
            name: 'login',
            component: login
        },{
            path: '/plan/pandect',
            title: '排期总览',
            name: 'pandect',
            component: pandect
        },{
            path: '/plan/schedule_table',
            title: '排期表',
            name: 'scheduleTable',
            component: scheduleTable
        },{
            path: '/plan/details_list',
            title: '排期表',
            name: 'detailsList',
            component: detailsList
        },{
            path: '/plan/echarts',
            title: '产量图',
            name: 'echarts',
            component: echarts
        },{
            path: '/user/user_group',
            title: '用户组管理',
            name: 'userGroup',
            component: userGroup
        },{
            path: '/user/group',
            title: '用户组管理',
            name: 'group',
            component: group
        },{
            path: '/site',
            title: '站点管理',
            name: 'site',
            component: site
        },{
            path: '/add_plan',
            title: '添加排期',
            name: 'addPlan',
            component: addPlan
        },{
            path: '/brand',
            title: '品牌商管理',
            name: 'brand',
            component: brand
        },{
            path: '/channel',
            title: '渠道管理',
            name: 'channel',
            component: channel
        }
    ]
})
